
import lejos.nxt.*;
import lejos.nxt.comm.*;
import java.io.*;
import lejos.robotics.navigation.*;

public class GoForward 
{
	
	public static void main(String[] args) throws Exception 
	{
		UltrasonicSensor sonic = new UltrasonicSensor(SensorPort.S1);
		TachoPilot robot = new TachoPilot(2.17f,4.57f,Motor.A, Motor.C);
		robot.setSpeed(200);
		
		robot.forward();
		
		while(!Button.ESCAPE.isPressed()) 
		{
			LCD.drawString("distance: " + robot.getTravelDistance() + "....." , 0, 0);
		}
		
		robot.stop();
	}

}

